#!/usr/bin/env ruby

LKP_SRC = ENV['LKP_SRC'] || File.dirname(File.dirname(File.dirname(File.realpath($PROGRAM_NAME))))

require "#{LKP_SRC}/lib/log"

stats = Hash.new { |h, k| h[k] = [] }

while (line = $stdin.gets)
  case line
  when /^ .*seconds.$/
    key = line.split[0].gsub(/$/, '_sec')
    stats[key] = line.split[1]
  when /^(Iterations|Score)/
    key = line.split[0]
    stats[key] = line.split[2]
  end
end

stats.each do |k, v|
  puts "#{k}: #{v}"
end
